package com.uwang.ssm.servlet;

import com.uwang.ssm.entity.UserEntity;
import com.uwang.ssm.services.UserServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
@RequestMapping("/")
public class UserController {

    @Autowired
    private UserServices userServices;

    @RequestMapping
    public String aVoid(Model model){
        System.out.println("少时诵诗书");
        UserEntity userEntity = userServices.seletc(4);
        model.addAttribute("user",userEntity);

        return "index";
    }
}
